package me.raih.controller.common;

import me.raih.pojo.Menu;
import me.raih.service.MenuService;
import me.raih.utils.MenuUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Raih
 * @version 1.8
 * @Time 2020/9/10  15:38
 */
@Controller
public class MenuController {

    @Autowired
    MenuService menuService;

    @RequestMapping(value = "/menuHelp")
    public List<Object> getMenuList(){
        List<Menu> menuList = menuService.findAllMenu();

        return MenuUtil.getMenuList(menuList);
    }

}
